import { Sprite } from "@/sprites/Sprite.js";
import { ImageManager } from "@/managers/ImageManager.js";

export class Sprite_PauseSign extends Sprite{
    constructor(){
        super();
        ImageManager.loadSystem('Sign').then(source=>{
            this.source=source;
        });
        this.floatSpeed=0.1;
        this.accumulator=0;
    }

    update(){
        if(this.visible){
            if(this.accumulator>3){
                this.accumulator=3;
                this.floatSpeed=-0.1;
            }else if(this.accumulator<-3){
                this.accumulator=-3;
                this.floatSpeed=0.1;
            }
            this.y+=this.floatSpeed;
            this.accumulator+=this.floatSpeed;
        }
    }
}